<!DOCTYPE html>
<html>
	<head>
		<tal:block metal:use-macro="../macros.tpl.php/headScripts" />
		<script src="/js/group_report.js"></script>
	</head>
	<body>
		<div id='container'>
			<tal:block metal:use-macro="../macros.tpl.php/header_inner" />
			
			<h1><center>${title}</center></h1>

			<tal:block tal:condition="not: login">
				<center><span style="color:red;">Only login user can view this page. click <a href="/login/">here</a> to login</span></center>
			</tal:block>
			<tal:block tal:condition="login">
				<form method="post">
					<table align="center">
						<thead>
							<tr align="center"><th colspan="2">View Filtered Expense Report</th></tr>
						</thead>
						<tbody>
							<tr>
								<td>Team:</td>
								<td>
									<select name="tid">
										<option value="">Select</option>
										<option tal:repeat="team teams" tal:attributes="value team/id;selected team/selected">${team/name}</option>						
									</select>									
								</td>
							</tr>
							<tr>
								<td>Members:</td>
								<td id="members"></td>
							</tr>
							<tr>
								<td></td>
								<td align="left"><button name="filterBtn" type="submit">Find</button></td>
							</tr>
						</tbody>
						<tfoot>
							<tr align="center">
								<td colspan="2" style="color:red;font-weight: bold;" id="formMsg"></td>
							</tr>
						</tfoot>
					</table>
				</form>

				<p></p>
				<table align="center" tal:condition="report">
					<thead>
						<tr>
							<td tal:repeat="rep report" style="font-weight: bold;width:200px;">${rep/user}</td>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td tal:repeat="rep report" style="font-weight: bold;width:200px;">Rs. ${rep/operator}${rep/money}</td>
						</tr>
					</tbody>
				</table>
			</tal:block>

		    <tal:block metal:use-macro="../macros.tpl.php/footer" />
		</div>
	</body>
</html>
